package com.example.linuxchat.utiltool;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author liulingjie
 * @date 20-5-23 下午11:00
 */
public class Time {
    public static String getNowTime(){
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()).replace(" ","T");
    }

    public static String getNowDate(){
        return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
    }

    public static void main(String [] args){
        System.out.println(Time.getNowTime());
    }
}
